<%-- 
    Document   : logined_content
    Created on : 16-Jul-2013, 14:43:32
    Author     : MrMAD
--%>

<%@page import="mybean.Customer"%>
<%@page import="mybean.DBProcess"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <style>
            fieldset{
                border: 1px dashed #e6e154; 
                color: #e6e154; 
                font-size: 15px; 
                padding-bottom: 20px;
            }
            legend{                
                font-size: 17px; 
                padding-bottom: 10px;
            }
            td{
                padding: 10px;
            }
            button{
                background: url("http://localhost:8080/FinalProject/images/templatemo_h1_bg.jpg") no-repeat scroll center center transparent;
                color: #FFFFFF;
                display: block;
                float: left;
                height: 30px;
                line-height: 25px;
                margin: 10px 0 0;
                text-align: center;
                text-decoration: none;
                width: 100px;
            }
        </style>
    </head>
    <body>
        <%            
            String loginedName = (String) session.getAttribute("name");
            DBProcess dbProcess = new DBProcess();
            Customer customer = dbProcess.getCustomer(loginedName);
        %>

        <script src="js/login.js"></script>
        <div id="templatemo_content_right">
            <fieldset>
                <legend>Your account information</legend>                
                <table>
                    <tr>
                        <td>User name</td>
                        <td><%= loginedName%></td>                            
                    </tr>
                    <tr>
                        <td>Email</td>
                        <td><%= customer.getEmail()%></td>                            
                    </tr>
                    <tr>
                        <td>Phone</td>
                        <td><%= customer.getPhone()%></td>                            
                    </tr>
                    <tr>
                        <td>Address</td>
                        <td><%= customer.getAddress()%></td>                            
                    </tr>
                    <tr>
                        <td>Company</td>
                        <td><%= customer.getCompany()%></td>                            
                    </tr>                        
                    <tr>
                        <td>Date of birth</td>
                        <td><%= customer.getDoB()%></td>                            
                    </tr>                        
                    <tr>                            
                        <td><button>Edit</button></td>
                        <td><button onclick="logout()">Log out</button></td>                        
                    </tr>
                </table>                
            </fieldset>
        </div><!-- end of content right -->
    </body>
</html>
